/**
 * SeviceRepairBO.java
 * Created on March 28, 2007, 3:39 PM
 *
 *
 */

package edu.byu.isys413.jjenkins.data;

import java.sql.Date;

/**
 * This class is the busines object for a service/repair. It contains all the 
 * attributes and logic needed for a servcie/repair.
 *
 * @author      Jeff Jenkins
 * @version     1.0
 */
public class ServiceRepairBO extends RevenueSourceBO{
    private Date dateStarted = null;
    private Date dateCompleted = null;
    private String description = null;
    private double laborHours = 0;
    private EmployeeBO employee = null;
    private Date datePickedUp = null;
    private TransactionLineBO refLine = null;
    private Date lastNoticeSent = null;
    private TransactionLineBO line = null;
    private double amount = 0;
    
    
    
    
    /** Creates a new instance of SeviceRepairBO */
    public ServiceRepairBO() {
    }
    
    /**
     * calles the getters to create a description of the service
     * and repair
     * @return string description
     */
    public String createDescription(){
        setDescription("");
        return getDescription();
        
    }
    
    /**
     * calculates the price of the service/repair
     * @return price
     */
    public double calcPrice(){
        
        // we set the price in the GUI
        return getPrice();
        
    }

    /**
     * gets the start date
     * @return date
     */
    public Date getDateStarted() {
        return dateStarted;
    }

    /**
     * sets the start date
     * @param dateStarted 
     */
    public void setDateStarted(Date dateStarted) {
        this.dateStarted = dateStarted;
    }

    /**
     * gets the date completed
     * @return date 
     */
    public Date getDateCompleted() {
        return dateCompleted;
    }

    /**
     * sets the date completed
     * @param dateCompleted 
     */
    public void setDateCompleted(Date dateCompleted) {
        this.dateCompleted = dateCompleted;
    }

    /**
     * gets the description
     * @return description
     */
    public String getDescription() {
        return description;
    }

    /**
     * sets the description
     * @param description 
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * gets the labor hours
     * @return labor horus
     */
    public double getLaborHours() {
        return laborHours;
    }

    /**
     * sets the labor hours
     * @param laborHours 
     */
    public void setLaborHours(double laborHours) {
        this.laborHours = laborHours;
    }

    /**
     * gets the employee
     * @return employee
     */
    public EmployeeBO getEmployee() {
        return employee;
    }

    /**
     * sets the employee
     * @param employee 
     */
    public void setEmployee(EmployeeBO employee) {
        this.employee = employee;
    }

    /**
     * gets the date picked up
     * @return date picked up
     */
    public Date getDatePickedUp() {
        return datePickedUp;
    }

    /**
     * sets the date picked up
     * @param datePickedUp 
     */
    public void setDatePickedUp(Date datePickedUp) {
        this.datePickedUp = datePickedUp;
    }

    /**
     * gets the transaction
     * @return transaction
     */
    public TransactionLineBO getTransaction() {
        return refLine;
    }

    /**
     * sets the transaction
     * @param refLine transaction line of the item getting serviced or repaired
     */
    public void setTransaction(TransactionLineBO refLine) {
        this.refLine = refLine;
    }

    /**
     * gets the date of the last notice sent
     * @return last notice sent date
     */
    public Date getLastNoticeSent() {
        return lastNoticeSent;
    }

    /**
     * sets the date of the last notice sent
     * @param lastNoticeSent date
     */
    public void setLastNoticeSent(Date lastNoticeSent) {
        this.lastNoticeSent = lastNoticeSent;
    }

    /**
     * gets the line
     * @return line
     */
    public TransactionLineBO getLine() {
        return line;
    }

    /**
     * sets the line
     * @param line 
     */
    public void setLine(TransactionLineBO line) {
        this.line = line;
    }

    /**
     * gets the amount of the service/repair
     * @return amount of repair
     */
    public double getAmount() {
        return amount;
    }

    /**
     * sets the amount of the service and repair
     * @param amount 
     */
    public void setAmount(double amount) {
        this.amount = amount;
    }

    
}
